package com.es.designmode.strategy;

/**
 * @author Will
 */
public class Context {

    Strategy strategy;

    /**
     * 初始化，传入具体策略对象
     */
    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 上下文接口
     * 根据具体的策略对象，调用算法
     */
    public void ContextInterface() {
        strategy.AlgorithmInterface();
    }
}
